package cn.mjnxin.iot.base.domain;

import io.netty.buffer.ByteBuf;

public interface TerminalRepacker {
	/**
	 * 改装从terminal收到的消息
	 * @param terminalAddress
	 * @param byteBuf
	 * @return
	 */
	ByteBuf repackFromTerminal(Integer pid, String terminalAddress, ByteBuf byteBuf);

	/**
	 * 改装要发给terminal的消息
	 * @param byteBuf
	 * @return
	 */
	ByteBuf repackBefore2Terminal(ByteBuf byteBuf);

	void unlinkTerminal(String terminalAddress);
}
